using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ProgramMain.Framework;
using ProgramMain.UniversalTariffPlans;

namespace ProgramMain.PhoneResources
{
    public partial class ClientPhoneResourceEditorCtl : BaseDetailCtl
    {
        public ClientPhoneResourceEditorCtl()
        {
            InitializeComponent();
        }

        public ClientPhoneListCtl.DetailIDTypes DetailIDType
        {
            get { return ucClientPhoneList1.DetailIDType; }
            set
            {
                ucClientPhoneList1.DetailIDType = value;
            }
        }

        public Nullable<Int32> OperatorID
        {
            get { return ucClientPhoneList1.OperatorID; }
            set
            {
                ucClientPhoneList1.OperatorID = value;
            }
        }
        
        private void ucClientPhoneResources_DetailIDChanged(object sender, EventArgs e)
        {
            ucClientPhoneList1.DetailID = this.DetailID;
        }

        private void ucClientPhoneList1_ViewRowIDChanged(object sender, ShowDetailEventArgs e)
        {
            ucClientPhoneSynList1.DetailID = ucClientPhoneList1.ViewRowID;
            clientPhoneResourceHardwareListCtl1.DetailID = ucClientPhoneList1.ViewRowID;
            universalTariffListCtl1.DetailID = ucClientPhoneList1.ViewRowID;
        }
    }
}
